package a.f.i;

import a.c.*;
import a.c.d;
import a.c.e;
import a.d.p;
import a.d.r;
import a.d.t;
import a.d.v;
import a.f.c.h;
import a.f.wb;
import a.f.xc;
import a.f.zc;
import a.i.db;
import a.i.l;

import java.awt.geom.Rectangle2D;
import java.util.*;

class b
{
  private static final int a = (int)Math.floor(Math.sqrt(2147483647.0D));
  private static final int b = 150;
  private static final int c = 100;
  private a.f.o d;
  private double e = 10.0D;
  private int f = 2147483647;
  private int g = 10;
  private int h = 15;
  private int i = 200;
  private boolean j;
  private h k;
  private z l;
  private boolean m = true;
  private boolean n;
  private boolean o;
  private long p = 1000L;
  private long q;
  private boolean r = true;
  private boolean s;
  private boolean t = true;
  private boolean u = true;
  private static final int v = 0;
  private static final int w = 1;
  private static final int x = 100;
  
  public boolean a()
  {
    return this.u;
  }
  
  public void a(boolean paramBoolean)
  {
    this.u = paramBoolean;
  }
  
  public boolean b()
  {
    return this.t;
  }
  
  public void b(boolean paramBoolean)
  {
    this.t = paramBoolean;
  }
  
  public boolean c()
  {
    return this.s;
  }
  
  public void c(boolean paramBoolean)
  {
    this.s = paramBoolean;
  }
  
  public int d()
  {
    return this.i;
  }
  
  public void a(int paramInt)
  {
    this.i = paramInt;
  }
  
  public boolean e()
  {
    return this.r;
  }
  
  public void d(boolean paramBoolean)
  {
    this.r = paramBoolean;
  }
  
  public boolean f()
  {
    return this.m;
  }
  
  public void e(boolean paramBoolean)
  {
    this.m = paramBoolean;
  }
  
  public long h()
  {
    return this.p;
  }
  
  public void a(long paramLong)
  {
    this.p = paramLong;
  }
  
  public boolean i()
  {
    return this.n;
  }
  
  public void f(boolean paramBoolean)
  {
    this.n = paramBoolean;
  }
  
  public boolean j()
  {
    return this.o;
  }
  
  public int l()
  {
    return this.h;
  }
  
  public void b(int paramInt)
  {
    this.h = paramInt;
  }
  
  public void g(boolean paramBoolean)
  {
    this.o = paramBoolean;
  }
  
  public int m()
  {
    return this.g;
  }
  
  public void c(int paramInt)
  {
    this.g = paramInt;
  }
  
  public boolean n()
  {
    return this.j;
  }
  
  public void h(boolean paramBoolean)
  {
    this.j = paramBoolean;
  }
  
  public int o()
  {
    return this.f;
  }
  
  public void d(int paramInt)
  {
    this.f = paramInt;
  }
  
  public double p()
  {
    return this.e;
  }
  
  public void a(double paramDouble)
  {
    this.e = paramDouble;
  }
  
  private int a(c paramc)
  {
    if (!a.wb) {}
    int i1 = this.f == 2147483647 ? 2147483647 : (int)Math.floor(this.f / this.e);
    if (paramc != null) {
      i1 = Math.min(i1, paramc.d());
    }
    return i1;
  }
  
  public void a(a.f.o paramo, bb[] paramArrayOfbb, Map paramMap1, Map paramMap2)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    a.c.x localx = paramo.B();
    String str = "fixed component";
    int i1 = 0;
    Object localObject;
    label108:
    label110:
    do
    {
      if (i1 >= paramArrayOfbb.length) {
        break;
      }
      localObject = paramArrayOfbb[i1];
      if (bool1) {
        break label117;
      }
      a.c.w localw2 = ((bb)localObject).l();
      do
      {
        if (!localw2.e()) {
          break;
        }
        e locale = localw2.d();
        localx.a(locale, localObject);
        localw2.f();
        if (bool2) {
          break label110;
        }
        if (bool1) {
          break label108;
        }
      } while (!bool1);
      if (!bool2) {
        i1++;
      }
    } while (!bool1);
    label117:
    a.c.w localw1 = paramo.v();
    do
    {
      if (!localw1.e()) {
        break;
      }
      localObject = localw1.d();
      if (bool1) {
        return;
      }
      if ((bool2) || (localx.get(localObject) == null)) {
        localx.a(localObject, str);
      }
      localw1.f();
    } while (!bool1);
    a(paramo, localx, str, paramMap1, paramMap2);
    if (!bool2) {
      paramo.a(localx);
    }
  }
  
  public void a(a.f.o paramo, k paramk, Object paramObject, Map paramMap1, Map paramMap2)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    this.q = System.currentTimeMillis();
    if (!bool2)
    {
      this.d = paramo;
      if (paramo.c(i.c) == null) {}
    }
    else
    {
      this.k = new h(paramo);
    }
    z localz = new z();
    HashMap localHashMap = new HashMap();
    Object localObject1 = paramo.v();
    Object localObject3;
    Object localObject4;
    label198:
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      localObject3 = paramk.get(localObject2);
      if (bool1) {
        break label259;
      }
      if (localObject3 == null) {
        throw new RuntimeException("found node without component id");
      }
      if (!bool2)
      {
        if (localHashMap.containsKey(localObject3)) {
          ((bb)localHashMap.get(localObject3)).add(localObject2);
        }
      }
      else
      {
        if (bool2) {
          continue;
        }
        if (!bool1) {
          break label198;
        }
      }
      localObject4 = new bb();
      ((bb)localObject4).add(localObject2);
      localHashMap.put(localObject3, localObject4);
      localz.add(localObject3);
      ((a.c.w)localObject1).f();
    } while (!bool1);
    this.l = new z();
    if (!bool2) {
      localObject1 = localz.h();
    }
    label259:
    do
    {
      do
      {
        if (!((a.c.y)localObject1).e()) {
          break;
        }
        localObject2 = ((a.c.y)localObject1).j();
        localObject3 = (bb)localHashMap.get(localObject2);
        localObject4 = new h_(localObject2, (bb)localObject3, localObject2.equals(paramObject), null);
        if (bool2) {
          break label365;
        }
        this.l.add(localObject4);
        ((a.c.y)localObject1).f();
        if (bool1) {
          break label358;
        }
      } while (!bool1);
    } while (bool2);
    if ((bool2) || (j())) {
      if (!bool2)
      {
        if (f()) {
          if (bool2) {
            break label682;
          }
        }
      }
      else {
        if (i()) {
          break label676;
        }
      }
    }
    label358:
    label365:
    localObject1 = new z();
    Object localObject2 = this.l.h();
    label617:
    do
    {
      if (!((a.c.y)localObject2).e()) {
        break;
      }
      localObject3 = (h_)((a.c.y)localObject2).j();
      if ((!bool2) && (bool1)) {
        return;
      }
      if (!bool2)
      {
        if (!((h_)localObject3).c())
        {
          if (bool2) {
            continue;
          }
          if (q())
          {
            if (!bool2) {}
            localObject4 = paramMap2 == null ? null : (SortedSet)paramMap2.get(((h_)localObject3).b());
            if (!bool2) {}
            c localc = paramMap1 == null ? null : (c)paramMap1.get(((h_)localObject3).b());
            if (localObject4 != null)
            {
              localt = ((h_)localObject3).a();
              if (!bool2) {
                if (this.s) {
                  a(localt, (SortedSet)localObject4, (z)localObject1);
                }
              }
              localObject5 = a((h_)localObject3, localc, (SortedSet)localObject4, false);
              if (!bool2)
              {
                if (localObject5 != null)
                {
                  if (!bool2)
                  {
                    if (this.r)
                    {
                      a((h_)localObject3, (c_)localObject5);
                      if (bool2) {
                        break label617;
                      }
                    }
                  }
                  else if (!bool1) {}
                }
                else {
                  b((h_)localObject3, localc);
                }
              }
              else
              {
                if (bool2) {
                  break label617;
                }
                if (!bool1) {}
              }
            }
            else
            {
              b((h_)localObject3, localc);
            }
            t localt = ((h_)localObject3).a();
            Object localObject5 = new a.d.w(localt.d + 0.5D * localt.a, localt.e + 0.5D * localt.b);
            ((z)localObject1).add(localObject5);
          }
        }
        ((a.c.y)localObject2).f();
      }
    } while (!bool1);
    label676:
    if (!bool2) {
      label682:
      if ((bool2) || (this.k != null))
      {
        this.k.e();
        this.k = null;
      }
    }
  }
  
  public void a(a.f.o paramo, k paramk1, k paramk2, bb parambb, c paramc, SortedSet paramSortedSet, boolean paramBoolean)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    this.q = System.currentTimeMillis();
    this.d = paramo;
    if (!bool2)
    {
      if (paramo.c(i.c) != null) {
        this.k = new h(paramo);
      }
      this.l = new z();
      this.l.add(new h_(parambb, parambb, false, paramk2));
    }
    bb localbb = new bb();
    Object localObject1 = paramo.v();
    Object localObject2;
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      if (bool1) {
        break label183;
      }
      if (paramk1.getBool(localObject2)) {
        localbb.add(localObject2);
      }
      ((a.c.w)localObject1).f();
    } while (!bool1);
    this.l.add(new h_(localbb, localbb, true, paramk2));
    if (!bool2) {
      if (j())
      {
        label183:
        if (bool2) {
          break label211;
        }
        if (f())
        {
          if (bool2) {
            break label428;
          }
          if (i()) {
            break label427;
          }
        }
      }
    }
    label211:
    localObject1 = this.l.h();
    if (((a.c.y)localObject1).e()) {}
    label382:
    label383:
    while (bool2)
    {
      localObject2 = (h_)((a.c.y)localObject1).j();
      if ((!bool2) && (bool1)) {
        return;
      }
      if (!bool2)
      {
        if (!((h_)localObject2).c())
        {
          if (bool2) {
            break label424;
          }
          if (q())
          {
            if ((bool2) || (paramSortedSet != null))
            {
              if (bool2) {
                break label382;
              }
              if (!paramSortedSet.isEmpty())
              {
                c_ localc_ = a((h_)localObject2, paramc, paramSortedSet, paramBoolean);
                if (!bool2)
                {
                  if (localc_ != null)
                  {
                    if (bool2) {
                      break label387;
                    }
                    if (!this.r) {
                      break label383;
                    }
                    a((h_)localObject2, localc_);
                    if (bool2) {
                      break label387;
                    }
                    if (!bool1) {
                      break label383;
                    }
                  }
                  b((h_)localObject2, paramc);
                }
                if (bool2) {
                  break label387;
                }
                if (!bool1) {
                  break label383;
                }
              }
            }
            b((h_)localObject2, paramc);
            if (bool2) {
              break label424;
            }
            if (this.r)
            {
              if (bool2) {
                break label424;
              }
              if (!this.j) {
                a((h_)localObject2, paramc);
              }
            }
          }
        }
        ((a.c.y)localObject1).f();
      }
      if (!bool1) {
        break;
      }
    }
    label387:
    label424:
    label427:
    label428:
    if ((bool2) || (this.k != null))
    {
      this.k.e();
      this.k = null;
    }
  }
  
  private void a(t paramt, SortedSet paramSortedSet, z paramz)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    a.c.y localy = paramz.h();
    do
    {
      if (!localy.e()) {
        break;
      }
      a.d.w localw = (a.d.w)localy.j();
      double d1 = a(paramt, localw);
      if (!bool2)
      {
        if (d1 < 500.0D)
        {
          paramSortedSet.add(new i_(new a.d.w(localw.a - 5000.0D, localw.b), new a.d.w(localw.a + 5000.0D, localw.b), (int)d1));
          paramSortedSet.add(new i_(new a.d.w(localw.a, localw.b - 5000.0D), new a.d.w(localw.a, localw.b + 5000.0D), (int)d1));
        }
        localy.f();
      }
    } while (!bool1);
  }
  
  void a(z paramz)
  {
    paramz.a(new Comparator()
    {
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        int i = l.a(((b.c_)paramAnonymousObject2).d.size(), ((b.c_)paramAnonymousObject1).d.size());
        if (!a.wb) {
          if (i != 0) {
            return i;
          }
        }
        return l.a(((b.c_)paramAnonymousObject1).c, ((b.c_)paramAnonymousObject2).c);
      }
    });
  }
  
  static double a(Rectangle2D paramRectangle2D, a.d.w paramw)
  {
    t localt = new t(paramRectangle2D.getX(), paramRectangle2D.getY(), paramRectangle2D.getWidth(), paramRectangle2D.getHeight());
    return a(localt, paramw);
  }
  
  static double a(t paramt, a.d.w paramw)
  {
    if (paramt.a(paramw.a, paramw.b)) {
      return 0.0D;
    }
    a.d.w localw1 = new a.d.w(paramt.d(), paramt.e());
    a.d.w localw2 = new a.d.w(localw1.a, localw1.b + paramt.c());
    a.d.w localw3 = new a.d.w(localw2.a + paramt.b(), localw2.b);
    a.d.w localw4 = new a.d.w(localw3.a, localw1.b);
    double d1 = 1.7976931348623157E+308D;
    a.d.n localn1 = new a.d.n(localw1, localw2);
    d1 = Math.min(d1, a(localn1, paramw));
    a.d.n localn2 = new a.d.n(localw4, localw3);
    d1 = Math.min(d1, a(localn2, paramw));
    a.d.n localn3 = new a.d.n(localw1, localw4);
    d1 = Math.min(d1, a(localn3, paramw));
    a.d.n localn4 = new a.d.n(localw2, localw3);
    d1 = Math.min(d1, a(localn4, paramw));
    return d1;
  }
  
  private void a(h_ paramh_, c_ paramc_)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    t localt = paramh_.a();
    a.d.w localw = new a.d.w(localt.d + 0.5D * localt.a, localt.e + 0.5D * localt.b);
    if ((bool2) || (!paramc_.d.isEmpty()))
    {
      a.c.y localy = paramc_.d.h();
      label176:
      do
      {
        if (!localy.e()) {
          break;
        }
        i_ locali_ = (i_)localy.j();
        a.d.n localn = locali_.n();
        if (!bool2)
        {
          if (localn.d().a() == localn.e().a()) {
            paramh_.a(localn.d().a() - localw.a(), 0.0D);
          }
        }
        else
        {
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label176;
          }
        }
        paramh_.a(0.0D, localn.d().b() - localw.b());
        localy.f();
      } while (!bool1);
    }
  }
  
  private void a(h_ paramh_, c paramc)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    if (((bool2) || (paramc != null)) && ((bool2) || (paramc.a != null)))
    {
      if (bool2) {
        break label45;
      }
      if (!paramc.c) {}
    }
    else
    {
      return;
    }
    label45:
    t localt1 = paramc.a;
    a.d.w localw1 = new a.d.w(localt1.d + 0.5D * localt1.a, localt1.e + 0.5D * localt1.b);
    t localt2 = paramh_.a();
    a.d.w localw2 = new a.d.w(localt2.d + 0.5D * localt2.a, localt2.e + 0.5D * localt2.b);
    if ((bool2) || (!localt1.b(localt2)))
    {
      if (!bool2) {
        if (localt1.b() < localt2.b())
        {
          paramh_.a(localw1.a - localw2.a, 0.0D);
          if (bool2) {
            break label295;
          }
          if (!bool1) {
            break label285;
          }
        }
      }
      if (!bool2) {
        if (localt1.d > localt2.d)
        {
          paramh_.a(localt1.d - localt2.d, 0.0D);
          if (bool2) {
            break label295;
          }
          if (!bool1) {
            break label285;
          }
        }
      }
      if (!bool2) {
        if (localt1.d + localt1.a < localt2.d + localt2.a) {
          paramh_.a(localt1.d + localt1.a - localt2.d - localt2.a, 0.0D);
        }
      }
      label285:
      label295:
      if (!bool2) {
        if (localt1.c() < localt2.c())
        {
          paramh_.a(0.0D, localw1.b - localw2.b);
          if ((!bool2) && (!bool1)) {
            return;
          }
        }
      }
      if (!bool2) {
        if (localt1.e > localt2.e) {
          paramh_.a(0.0D, localt1.e - localt2.e);
        }
      }
      if ((bool2) || ((bool1) && (localt1.e + localt1.b < localt2.e + localt2.b))) {
        paramh_.a(0.0D, localt1.e + localt1.b - localt2.e - localt2.b);
      }
    }
  }
  
  static double a(a.d.n paramn, a.d.w paramw)
  {
    boolean bool = a.wb;
    double d1 = paramn.d().a;
    double d2 = paramn.e().a;
    double d3 = paramn.d().b;
    double d4 = paramn.e().b;
    double d5 = paramw.a();
    double d6 = paramw.b();
    d2 -= d1;
    d4 -= d3;
    d5 -= d1;
    d6 -= d3;
    double d7 = 0.0D;
    double d8 = d5 * d2 + d6 * d4;
    if (!bool) {
      if (d8 > 0.0D)
      {
        d5 = d2 - d5;
        d6 = d4 - d6;
        d8 = d5 * d2 + d6 * d4;
        if (!bool) {
          if (d8 <= 0.0D)
          {
            if (bool) {
              break label192;
            }
            d7 = 0.0D;
            if (!a.vb) {
              break label178;
            }
          }
        }
        d7 = d8 * d8 / (d2 * d2 + d4 * d4);
      }
    }
    label178:
    label192:
    double d9 = d5 * d5 + d6 * d6 - d7;
    if (!bool) {
      if (d9 < 0.0D) {
        return 0.0D;
      }
    }
    return Math.sqrt(d9);
  }
  
  private boolean q()
  {
    if (!a.wb) {}
    return System.currentTimeMillis() - this.q < this.p;
  }
  
  private int a(h_ paramh_)
  {
    boolean bool = a.vb;
    double d1 = 1.7976931348623157E+308D;
    double d2 = 1.7976931348623157E+308D;
    double d3 = -1.797693134862316E+308D;
    double d4 = -1.797693134862316E+308D;
    Object localObject = this.l.h();
    do
    {
      if (!((a.c.y)localObject).e()) {
        break;
      }
      h_ localh_ = (h_)((a.c.y)localObject).j();
      if (bool) {
        break label144;
      }
      if (localh_ != paramh_)
      {
        t localt = localh_.a();
        d1 = Math.min(d1, localt.d);
        d2 = Math.min(d2, localt.e);
        d3 = Math.max(d3, localt.d + localt.a);
        d4 = Math.max(d4, localt.e + localt.b);
      }
      ((a.c.y)localObject).f();
    } while (!bool);
    label144:
    localObject = paramh_.a();
    double d5 = d3 - d1 + ((t)localObject).a;
    double d6 = d4 - d2 + ((t)localObject).b;
    double d7 = Math.max(d5 / a, d6 / a);
    return (int)Math.floor(Math.max(5.0D * d7 + d5 / a, 5.0D * d7 + d6 / a));
  }
  
  private c_ a(h_ paramh_, c paramc, SortedSet paramSortedSet, boolean paramBoolean)
  {
    boolean bool2 = a.wb;
    t localt = paramh_.a();
    double d1 = this.e;
    if (!bool2) {
      if (this.t) {
        this.e = ((int)Math.ceil(Math.sqrt((localt.c() + 2 * this.h) * (localt.b() + 2 * this.h) / 150.0D)));
      }
    }
    this.e = Math.max(this.e, a(paramh_));
    if ((bool2) || (paramc != null))
    {
      paramc.a(localt, this.e);
      if (((bool2) || (!this.j)) && ((bool2) || ((!paramc.c) && (paramc.b())))) {
        return null;
      }
    }
    a.d.w localw = new a.d.w(localt.d + 0.5D * localt.a, localt.e + 0.5D * localt.b);
    z localz1 = a(null, paramh_);
    d_ locald_1 = b(localz1, 0.0D);
    z localz2 = b(paramh_);
    double d2 = this.h + ((bool2) || ((!paramSortedSet.isEmpty()) && ((bool2) || (this.r))) ? this.e : 0.0D);
    d_ locald_2 = b(localz2, d2);
    int i1 = (int)Math.floor(localw.a / this.e);
    int i2 = (int)Math.floor(localw.b / this.e);
    int i3 = (int)Math.max(1.0D, Math.ceil(this.g / this.e));
    int i4 = a(paramc);
    z[] arrayOfz = a(i4, paramSortedSet, i1, i2);
    z localz3 = c(arrayOfz[1]);
    if ((!this.j) && (((!bool2) && (paramc == null)) || ((bool2) || (!paramc.c)))) {
      if (!bool2) {
        if (locald_2.a * locald_2.b >= 150) {
          if (bool2) {
            break label401;
          }
        }
      }
    }
    label401:
    boolean bool1 = this.t;
    c_ localc_ = locald_2.a(locald_1, i1, i2, i3, i4, bool1, paramc, arrayOfz[0], localz3, paramBoolean);
    if (localc_ != null) {
      paramh_.a(locald_2.a() * this.e, locald_2.b() * this.e);
    }
    if ((bool2) || (this.t)) {
      this.e = d1;
    }
    return localc_;
  }
  
  private z[] a(int paramInt1, SortedSet paramSortedSet, int paramInt2, int paramInt3)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    z[] arrayOfz = new z[2];
    arrayOfz[0] = new z();
    arrayOfz[1] = new z();
    int i1 = 0;
    int i2 = 0;
    Iterator localIterator = paramSortedSet.iterator();
    label375:
    do
    {
      i_ locali_;
      do
      {
        a.d.n localn;
        int i3;
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          localn = (a.d.n)localIterator.next();
          i3 = 0;
          if (!bool2) {
            if (localn.d().a() == localn.e().a())
            {
              i2++;
              if (!bool2) {}
              i3 = i2 < 100 ? 1 : 0;
              if (bool2) {
                continue;
              }
              if (!bool1) {
                continue;
              }
            }
          }
          if (!bool2)
          {
            if (localn.d().b() == localn.e().b()) {
              i1++;
            }
          }
          else
          {
            if (!bool2) {}
            i3 = i1 < 100 ? 1 : 0;
            if (bool2) {
              continue;
            }
            if (!bool1) {
              continue;
            }
          }
          throw new RuntimeException("found non horizontal/vertical line segment!");
        } while (i3 == 0);
        locali_ = a(localn, this.e);
        double d1 = Math.min(locali_.d().a, locali_.e().a);
        double d2 = Math.max(locali_.d().a, locali_.e().a);
        double d3 = Math.min(locali_.d().b, locali_.e().b);
        double d4 = Math.max(locali_.d().b, locali_.e().b);
        if (!bool2) {
          if (paramInt1 < 2147483647)
          {
            if (!bool2) {
              if (paramInt2 - paramInt1 <= d2)
              {
                if (bool2) {
                  break label375;
                }
                if (paramInt2 + paramInt1 >= d1)
                {
                  if (bool2) {
                    break label375;
                  }
                  if (paramInt3 - paramInt1 <= d4) {
                    if (bool2) {
                      break label375;
                    }
                  }
                }
              }
            }
            int i4 = paramInt3 + paramInt1 < d3 ? 1 : 0;
            if (bool2) {
              break label425;
            }
            if (i4 != 0) {
              break label421;
            }
            arrayOfz[0].add(locali_);
            if (bool2) {
              break label425;
            }
            if (!bool1) {
              break label421;
            }
          }
        }
        arrayOfz[0].add(locali_);
        double d5 = Math.floor(this.i / this.e);
        if (!bool2) {
          if (paramInt2 - d5 <= d2)
          {
            if (bool2) {
              break label503;
            }
            if (paramInt2 + d5 >= d1)
            {
              if (bool2) {
                break label503;
              }
              if (paramInt3 - d5 <= d4) {
                if (bool2) {
                  break label503;
                }
              }
            }
          }
        }
        int i5 = paramInt3 + d5 < d3 ? 1 : 0;
        if (bool2) {
          break;
        }
      } while (i5 != 0);
      if (bool2) {
        break label541;
      }
      arrayOfz[1].add(locali_);
    } while (!bool1);
    label421:
    label425:
    label503:
    return arrayOfz;
  }
  
  private z c(z paramz)
  {
    b_ localb_ = new b_();
    a.d.m.a(paramz, localb_);
    return localb_.a();
  }
  
  private boolean b(h_ paramh_, c paramc)
  {
    boolean bool3 = a.wb;
    double d1 = this.e;
    t localt = paramh_.a();
    if (!bool3) {
      if (this.t) {
        this.e = ((int)Math.ceil(Math.sqrt((localt.c() + 2 * this.h) * (localt.b() + 2 * this.h) / 150.0D)));
      }
    }
    this.e = Math.max(this.e, a(paramh_));
    if ((bool3) || (paramc != null))
    {
      paramc.a(localt, this.e);
      if (((bool3) || (!this.j)) && ((bool3) || (!paramc.c)) && ((bool3) || (paramc.b()))) {
        return false;
      }
    }
    a.d.w localw = new a.d.w(localt.d + 0.5D * localt.a, localt.e + 0.5D * localt.b);
    z localz1 = a(paramc, paramh_);
    d_ locald_1 = b(localz1, 0.0D);
    z localz2 = b(paramh_);
    d_ locald_2 = b(localz2, this.h);
    int i1 = (int)Math.floor(localw.a / this.e);
    int i2 = (int)Math.floor(localw.b / this.e);
    int i3 = (int)Math.max(1.0D, Math.ceil(this.g / this.e));
    int i4 = a(paramc);
    if ((!this.j) && (((!bool3) && (paramc == null)) || ((bool3) || (!paramc.c)))) {
      if (!bool3) {
        if (locald_2.a * locald_2.b >= 150) {
          if (bool3) {
            break label343;
          }
        }
      }
    }
    label343:
    boolean bool1 = this.t;
    boolean bool2 = locald_2.a(locald_1, i1, i2, i3, i4, paramc, bool1);
    if (!bool3)
    {
      if (bool2) {
        paramh_.a(locald_2.a() * this.e, locald_2.b() * this.e);
      }
    }
    else
    {
      if (bool3) {
        break label537;
      }
      if (!a.vb) {
        break label533;
      }
    }
    if (paramc != null) {
      if (!bool3)
      {
        if (!this.j)
        {
          if (bool3) {
            break label537;
          }
          if (!paramc.c) {}
        }
        else
        {
          i4 = a(null);
          localz1 = a(null, paramh_);
          locald_1 = b(localz1, 0.0D);
          paramc.a(false);
          bool2 = locald_2.a(locald_1, i1, i2, i3, i4, paramc, false);
          paramc.a(true);
        }
      }
      else
      {
        if (bool3) {
          break label537;
        }
        if (bool2) {
          paramh_.a(locald_2.a() * this.e, locald_2.b() * this.e);
        }
      }
    }
    label533:
    label537:
    if (!bool3) {
      if (this.t) {
        this.e = d1;
      }
    }
    return bool2;
  }
  
  static z a(z paramz, double paramDouble)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    z localz = new z();
    a.c.y localy = paramz.h();
    do
    {
      if (!localy.e()) {
        break;
      }
      a.d.n localn = (a.d.n)localy.j();
      if (!bool2)
      {
        if (bool1) {
          break label80;
        }
        localz.add(a(localn, paramDouble));
        localy.f();
      }
    } while (!bool1);
    label80:
    return localz;
  }
  
  static i_ a(a.d.n paramn, double paramDouble)
  {
    if (!a.wb) {}
    int i1 = (paramn instanceof i_) ? ((i_)paramn).m() : 100;
    a.d.w localw1 = paramn.d();
    a.d.w localw2 = paramn.e();
    a.d.w localw3 = new a.d.w((int)Math.floor(localw1.a / paramDouble), (int)Math.floor(localw1.b / paramDouble));
    a.d.w localw4 = new a.d.w((int)Math.floor(localw2.a / paramDouble), (int)Math.floor(localw2.b / paramDouble));
    return new i_(localw3, localw4, i1, paramn);
  }
  
  private z a(c paramc, h_ paramh_)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    z localz = new z();
    if (!bool2) {}
    t localt = paramc == null ? null : paramc.a;
    a.c.y localy1 = this.l.h();
    label53:
    if (localy1.e()) {}
    label177:
    label240:
    while (bool2)
    {
      h_ localh_ = (h_)localy1.j();
      if (!bool2)
      {
        if (localh_ != paramh_)
        {
          a.c.y localy2 = localh_.e().h();
          do
          {
            if (!localy2.e()) {
              break label300;
            }
            f_ localf_ = (f_)localy2.j();
            if (bool1) {
              break;
            }
            if (!f())
            {
              if (bool2) {
                break label177;
              }
              if (localf_.b())
              {
                if (localt != null)
                {
                  if (bool2) {
                    continue;
                  }
                  if (!localf_.a(localt)) {
                    break label288;
                  }
                }
                localz.add(localf_);
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break label288;
                }
              }
            }
            if (!bool2) {
              if (!j())
              {
                if (bool2) {
                  break label240;
                }
                if (localf_.g == 1)
                {
                  if (localt != null)
                  {
                    if (bool2) {
                      continue;
                    }
                    if (!localf_.a(localt)) {
                      break label288;
                    }
                  }
                  localz.add(localf_);
                  if (bool2) {
                    continue;
                  }
                  if (!bool1) {
                    break label288;
                  }
                }
              }
            }
            if (!bool2)
            {
              if (!i())
              {
                if (bool2) {
                  continue;
                }
                if (localf_.g == 0) {
                  if (localt != null)
                  {
                    if (bool2) {
                      continue;
                    }
                    if (!localf_.a(localt)) {}
                  }
                  else
                  {
                    localz.add(localf_);
                  }
                }
              }
              localy2.f();
            }
          } while (!bool1);
        }
        localy1.f();
      }
      if (bool2) {
        break label53;
      }
      if (!bool1) {
        break;
      }
    }
    label288:
    label300:
    return localz;
  }
  
  private z b(h_ paramh_)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    z localz = new z();
    a.c.y localy = paramh_.e().h();
    if (localy.e()) {}
    label92:
    while (bool2)
    {
      f_ localf_ = (f_)localy.j();
      if (!bool2) {
        if (!f())
        {
          if (bool2) {
            break label92;
          }
          if (localf_.b())
          {
            localz.add(localf_);
            if (bool2) {
              break label171;
            }
            if (!bool1) {
              break label163;
            }
          }
        }
      }
      if (!bool2) {
        if (!j())
        {
          if (bool2) {
            break label135;
          }
          if (localf_.g == 1)
          {
            localz.add(localf_);
            if (bool2) {
              break label171;
            }
            if (!bool1) {
              break label163;
            }
          }
        }
      }
      if (!bool2)
      {
        if (!i())
        {
          if (bool2) {
            break label171;
          }
          if (localf_.g == 0) {
            localz.add(localf_);
          }
        }
        localy.f();
      }
      if (!bool1) {
        break;
      }
    }
    label135:
    label163:
    label171:
    return localz;
  }
  
  private d_ b(z paramz, double paramDouble)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    int i1 = 2147483647;
    int i2 = -2147483648;
    int i3 = 2147483647;
    int i4 = -2147483648;
    Rectangle2D.Double localDouble = new Rectangle2D.Double();
    Object localObject1 = paramz.h();
    Object localObject3;
    Object localObject4;
    Object localObject5;
    label529:
    label662:
    label664:
    do
    {
      do
      {
        if (!((a.c.y)localObject1).e()) {
          break label667;
        }
        localObject2 = (f_)((a.c.y)localObject1).j();
        if ((!bool2) && (bool1)) {
          break label684;
        }
        if (bool2) {
          break;
        }
        if (((f_)localObject2).g == 1)
        {
          localObject3 = this.d.n((d)((f_)localObject2).e);
          localObject4 = ((a.d.y)localObject3).l();
          do
          {
            if (!((v)localObject4).e()) {
              break;
            }
            localObject5 = ((v)localObject4).a();
            i1 = Math.min(i1, (int)Math.floor(((a.d.n)localObject5).d().a / this.e));
            i2 = Math.max(i2, (int)Math.floor(((a.d.n)localObject5).d().a / this.e));
            i3 = Math.min(i3, (int)Math.floor(((a.d.n)localObject5).d().b / this.e));
            i4 = Math.max(i4, (int)Math.floor(((a.d.n)localObject5).d().b / this.e));
            i1 = Math.min(i1, (int)Math.floor(((a.d.n)localObject5).e().a / this.e));
            i2 = Math.max(i2, (int)Math.floor(((a.d.n)localObject5).e().a / this.e));
            i3 = Math.min(i3, (int)Math.floor(((a.d.n)localObject5).e().b / this.e));
            i4 = Math.max(i4, (int)Math.floor(((a.d.n)localObject5).e().b / this.e));
            ((v)localObject4).f();
            if (bool2) {
              break label664;
            }
            if (bool1) {
              break label662;
            }
          } while (!bool1);
        }
      } while (bool2);
      if (!bool2)
      {
        if (paramDouble > 0.0D) {
          if (bool2) {
            break label529;
          }
        }
      }
      else if (((f_)localObject2).g == 0)
      {
        localObject3 = ((f_)localObject2).a();
        localDouble.setFrame(((t)localObject3).d() - paramDouble, ((t)localObject3).e() - paramDouble, ((t)localObject3).b() + 2.0D * paramDouble, ((t)localObject3).c() + 2.0D * paramDouble);
        i1 = Math.min((int)Math.floor(localDouble.x / this.e), i1);
        i3 = Math.min((int)Math.floor(localDouble.y / this.e), i3);
        i2 = Math.max((int)Math.floor((localDouble.x + localDouble.width) / this.e), i2);
        i4 = Math.max((int)Math.floor((localDouble.y + localDouble.height) / this.e), i4);
        if (bool2) {
          break label653;
        }
        if (!bool1) {
          break label655;
        }
      }
      localObject3 = ((f_)localObject2).a();
      localDouble.setFrame(((t)localObject3).d(), ((t)localObject3).e(), ((t)localObject3).b(), ((t)localObject3).c());
      i1 = Math.min((int)Math.floor(localDouble.x / this.e), i1);
      i3 = Math.min((int)Math.floor(localDouble.y / this.e), i3);
      i2 = Math.max((int)Math.floor((localDouble.x + localDouble.width) / this.e), i2);
      i4 = Math.max((int)Math.floor((localDouble.y + localDouble.height) / this.e), i4);
      ((a.c.y)localObject1).f();
    } while (!bool1);
    label653:
    label655:
    label667:
    i1 -= 2;
    i3 -= 2;
    i2 += 2;
    if (!bool2) {
      i4 += 2;
    }
    label684:
    localObject1 = new d_(i1, i3, i2 - i1, i4 - i3);
    Object localObject2 = paramz.h();
    label721:
    if (((a.c.y)localObject2).e()) {}
    label1027:
    label1057:
    label1134:
    label1141:
    label1143:
    while (bool2)
    {
      localObject3 = (f_)((a.c.y)localObject2).j();
      if ((!bool2) && (bool1)) {
        break label1155;
      }
      if (((f_)localObject3).g == 1)
      {
        localObject4 = this.d.n((d)((f_)localObject3).e);
        localObject5 = ((a.d.y)localObject4).l();
        do
        {
          if (!((v)localObject5).e()) {
            break;
          }
          a.d.n localn = ((v)localObject5).a();
          a((d_)localObject1, localn.d().a, localn.d().b, localn.e().a, localn.e().b, this.e);
          ((v)localObject5).f();
          if (bool2) {
            break label1143;
          }
          if (bool1) {
            break label1141;
          }
        } while (!bool1);
      }
      if (bool2) {
        break label721;
      }
      if (!bool2)
      {
        if (paramDouble > 0.0D) {
          if (bool2) {
            break label1027;
          }
        }
      }
      else if (((f_)localObject3).g == 0)
      {
        localObject4 = ((f_)localObject3).a();
        localDouble.setFrame(((t)localObject4).d() - paramDouble, ((t)localObject4).e() - paramDouble, ((t)localObject4).b() + 2.0D * paramDouble, ((t)localObject4).c() + 2.0D * paramDouble);
        ((d_)localObject1).a((int)Math.floor(localDouble.x / this.e), (int)Math.floor(localDouble.y / this.e), 1 + (int)Math.floor((localDouble.x + localDouble.width) / this.e), 1 + (int)Math.floor((localDouble.y + localDouble.height) / this.e));
        if (bool2) {
          break label1057;
        }
        if (!bool1) {
          break label1134;
        }
      }
      localObject4 = ((f_)localObject3).a();
      localDouble.setFrame(((t)localObject4).d(), ((t)localObject4).e(), ((t)localObject4).b(), ((t)localObject4).c());
      ((d_)localObject1).a((int)Math.floor(localDouble.x / this.e), (int)Math.floor(localDouble.y / this.e), 1 + (int)Math.floor((localDouble.x + localDouble.width) / this.e), 1 + (int)Math.floor((localDouble.y + localDouble.height) / this.e));
      ((a.c.y)localObject2).f();
      if (!bool1) {
        break;
      }
    }
    if (!this.u) {
      label1155:
      ((d_)localObject1).d();
    }
    return localObject1;
  }
  
  static void a(d_ paramd_, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    double d1 = paramDouble3 - paramDouble1;
    double d2 = paramDouble4 - paramDouble2;
    double d3 = 0.1D;
    if (!bool2) {
      if (paramDouble5 > 1.0D)
      {
        int i1 = 1 + (int)Math.rint(paramDouble5);
        do
        {
          if (i1 <= 0) {
            break;
          }
          if (bool2) {
            break label102;
          }
          d3 /= 10.0D;
          i1 /= 10;
          if (bool1) {
            break label99;
          }
        } while (!bool1);
      }
    }
    if (!bool2) {
      d3 = Math.min(d3, 1.E-005D);
    }
    label99:
    label102:
    double d4 = 0.1D;
    if (!bool2)
    {
      if (paramDouble5 > 1.0D)
      {
        i2 = 1 + (int)Math.rint(paramDouble5);
        do
        {
          if (i2 <= 0) {
            break;
          }
          d4 /= 10.0D;
          i2 /= 10;
          if (bool2) {
            break label189;
          }
          if (bool1) {
            break label181;
          }
        } while (!bool1);
      }
      d4 = Math.min(d4, 1.E-005D);
    }
    int i2 = (int)Math.floor(paramDouble1 / paramDouble5);
    label181:
    label189:
    int i3 = (int)Math.floor(paramDouble2 / paramDouble5);
    int i4 = (int)Math.floor(paramDouble3 / paramDouble5);
    int i5 = (int)Math.floor(paramDouble4 / paramDouble5);
    int i6 = i4 - i2;
    int i7 = i5 - i3;
    if (!bool2)
    {
      if (i6 != 0)
      {
        if (bool2) {
          break label291;
        }
        if (Math.abs(d1) >= d3) {}
      }
      else
      {
        paramd_.a(i2, Math.min(i3, i5), i2 + 1, Math.max(i3, i5) + 1);
      }
    }
    else if ((!bool2) && (!bool1)) {
      return;
    }
    label291:
    if (!bool2)
    {
      if (i7 != 0)
      {
        if (bool2) {
          break label362;
        }
        if (Math.abs(d2) >= d4) {}
      }
      else
      {
        paramd_.a(Math.min(i2, i4), i3, Math.max(i2, i4) + 1, i3 + 1);
      }
    }
    else if ((!bool2) && (!bool1)) {
      return;
    }
    label362:
    double d5;
    double d6;
    double d7;
    double d8;
    int i9;
    int i10;
    if (!bool2) {
      if (Math.abs(d1) > Math.abs(d2))
      {
        if (i2 > i4)
        {
          d5 = d2 / d1;
          d6 = paramDouble4;
          d7 = (Math.floor(paramDouble3 / paramDouble5) + 1.0D - i4) * d5 + paramDouble4;
          d8 = paramDouble5 * d5;
          i8 = i4;
          do
          {
            do
            {
              if (i8 >= i2) {
                break;
              }
              i9 = (int)Math.floor(d6 / paramDouble5);
              i10 = (int)Math.floor(d7 / paramDouble5);
              paramd_.a(i8, i9, true);
              if (bool1) {
                break label540;
              }
              if (i9 != i10)
              {
                if (bool2) {
                  continue;
                }
                if (i8 < i2) {
                  paramd_.a(i8, i10, true);
                }
              }
              d6 = d7;
              d7 += d8;
              i8++;
            } while (!bool1);
            i8 = (int)Math.floor(d6 / paramDouble5);
            paramd_.a(i2, i8, true);
          } while (bool2);
          if (i8 == i3) {
            label540:
            return;
          }
          paramd_.a(i2, i3, true);
          if (!bool2) {
            if (!bool1) {
              return;
            }
          }
        }
        else
        {
          d5 = d2 / d1;
          d6 = paramDouble2;
          d7 = (Math.floor(paramDouble1 / paramDouble5) + 1.0D - i2) * d5 + paramDouble2;
          d8 = paramDouble5 * d5;
        }
        i8 = i2;
        do
        {
          do
          {
            if (i8 >= i4) {
              break;
            }
            i9 = (int)Math.floor(d6 / paramDouble5);
            i10 = (int)Math.floor(d7 / paramDouble5);
            paramd_.a(i8, i9, true);
            if (bool1) {
              break label710;
            }
            if (i9 != i10) {
              paramd_.a(i8, i10, true);
            }
            d6 = d7;
            d7 += d8;
            i8++;
          } while (!bool1);
          i8 = (int)Math.floor(d6 / paramDouble5);
          paramd_.a(i4, i8, true);
        } while (bool2);
        if (i8 == i5) {
          label710:
          return;
        }
        paramd_.a(i4, i5, true);
        if ((!bool2) && (!bool1)) {
          return;
        }
      }
    }
    if (i3 > i5)
    {
      d5 = d1 / d2;
      d6 = paramDouble3;
      d7 = (Math.floor(paramDouble4 / paramDouble5) + 1.0D - i5) * d5 + paramDouble3;
      d8 = paramDouble5 * d5;
      i8 = i5;
      do
      {
        do
        {
          if (i8 >= i3) {
            break;
          }
          i9 = (int)Math.floor(d6 / paramDouble5);
          i10 = (int)Math.floor(d7 / paramDouble5);
          paramd_.a(i9, i8, true);
          if (bool1) {
            break label890;
          }
          if (i9 != i10) {
            paramd_.a(i10, i8, true);
          }
          d6 = d7;
          d7 += d8;
          i8++;
        } while (!bool1);
        i8 = (int)Math.floor(d6 / paramDouble5);
        paramd_.a(i8, i3, true);
      } while (bool2);
      if (i8 == i2) {
        label890:
        return;
      }
      paramd_.a(i2, i3, true);
      if (!bool2) {
        if (!bool1) {
          return;
        }
      }
    }
    else
    {
      d5 = d1 / d2;
      d6 = paramDouble1;
      d7 = (Math.floor(paramDouble2 / paramDouble5) + 1.0D - i3) * d5 + paramDouble1;
      d8 = paramDouble5 * d5;
    }
    int i8 = i3;
    do
    {
      do
      {
        if (i8 >= i5) {
          break;
        }
        i9 = (int)Math.floor(d6 / paramDouble5);
        i10 = (int)Math.floor(d7 / paramDouble5);
        paramd_.a(i9, i8, true);
        if (bool1) {
          break label1060;
        }
        if (i9 != i10) {
          paramd_.a(i10, i8, true);
        }
        d6 = d7;
        d7 += d8;
        i8++;
      } while (!bool1);
      i8 = (int)Math.floor(d6 / paramDouble5);
      paramd_.a(i8, i5, true);
    } while (bool2);
    if (i8 != i4) {
      label1060:
      paramd_.a(i4, i5, true);
    }
  }
  
  final class d_
  {
    int a;
    int b;
    int c;
    int d;
    int e;
    int f;
    private g g;
    private int h;
    private int i;
    private int j;
    
    d_(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      this.a = paramInt3;
      this.b = paramInt4;
      this.c = paramInt1;
      this.e = 0;
      this.d = paramInt2;
      this.f = 0;
      this.g = new g(paramInt3 * paramInt4);
    }
    
    int a()
    {
      return this.e;
    }
    
    int b()
    {
      return this.f;
    }
    
    void a(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      int k = paramInt2;
      do
      {
        while (!bool1)
        {
          if (k >= paramInt4) {
            break;
          }
          a(paramInt1, paramInt3, k, true);
          k++;
        }
      } while (bool2);
    }
    
    void d()
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      int[] arrayOfInt1 = new int[this.b];
      int[] arrayOfInt2 = new int[this.b];
      int[] arrayOfInt3 = new int[this.a];
      int[] arrayOfInt4 = new int[this.a];
      int k = 0;
      do
      {
        do
        {
          if (k >= arrayOfInt1.length) {
            break;
          }
          arrayOfInt1[k] = this.a;
          arrayOfInt2[k] = -1;
          k++;
          if (bool2) {
            break label90;
          }
          if (bool1) {
            break label88;
          }
        } while (!bool1);
      } while (bool2);
      k = 0;
      label88:
      label90:
      do
      {
        do
        {
          if (k >= arrayOfInt3.length) {
            break;
          }
          arrayOfInt3[k] = this.b;
          arrayOfInt4[k] = -1;
          k++;
          if (bool2) {
            break label144;
          }
          if (bool1) {
            break label142;
          }
        } while (!bool1);
      } while (bool2);
      k = this.g.nextSetBit(0);
      label142:
      label144:
      int n;
      do
      {
        do
        {
          if (k < 0) {
            break;
          }
          m = k % this.a;
          n = k / this.a;
          arrayOfInt1[n] = Math.min(arrayOfInt1[n], m);
          arrayOfInt3[m] = Math.min(arrayOfInt3[m], n);
          arrayOfInt2[n] = Math.max(arrayOfInt2[n], m);
          arrayOfInt4[m] = Math.max(arrayOfInt4[m], n);
          k = this.g.nextSetBit(k + 1);
          if (bool2) {
            break label256;
          }
          if (bool1) {
            break label255;
          }
        } while (!bool1);
      } while (bool2);
      k = 0;
      label255:
      int m = 0;
      label256:
      label354:
      do
      {
        do
        {
          if (m >= this.b) {
            return;
          }
          n = arrayOfInt1[m];
          do
          {
            if (n >= arrayOfInt2[m]) {
              break;
            }
            if (bool2) {
              break label403;
            }
            if (bool1) {
              break label395;
            }
            if (arrayOfInt3[n] <= m)
            {
              if (bool2) {
                continue;
              }
              if (arrayOfInt4[n] >= m)
              {
                int i1 = n + 1;
                do
                {
                  if (arrayOfInt3[i1] > m) {
                    break label354;
                  }
                  if (bool1) {
                    break;
                  }
                  if (arrayOfInt4[i1] < m) {
                    break label354;
                  }
                  i1++;
                } while (!bool1);
                if (bool2) {
                  break;
                }
                this.g.set(k + n, k + i1);
              }
            }
            n++;
          } while (!bool1);
        } while (bool2);
        k += this.a;
        m++;
      } while (!bool1);
      label395:
      label403:
      return;
    }
    
    void a(d_ paramd_, int paramInt1, int paramInt2, double paramDouble, boolean paramBoolean)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      int k = this.c + this.a / 2;
      int m = this.d + this.b / 2;
      c(paramInt1 - k, paramInt2 - m);
      if (!bool2) {
        if (paramBoolean)
        {
          n = 0;
          do
          {
            if (a(paramd_, 0, 0, n)) {
              break;
            }
            n++;
            if ((!bool2) && (bool1)) {
              return;
            }
          } while (!bool1);
        }
      }
      int n = 0;
      int i1 = 0;
      label139:
      label155:
      label235:
      if (!bool2)
      {
        if (!bool2) {
          if (a(paramd_, 0, 0)) {
            paramd_.c(this);
          }
        }
        label123:
        do
        {
          return;
          break label384;
          break label235;
          break label387;
          double d1 = (n + 1) / i1 / paramDouble;
          double d2 = n / (i1 + 1) / paramDouble;
          int i2;
          do
          {
            if (d1 < 1.0D) {
              d1 = 1.0D / d1;
            }
            do
            {
              if (d2 < 1.0D) {
                d2 = 1.0D / d2;
              }
              if (!bool2)
              {
                if (d1 < d2)
                {
                  n++;
                  if (((!bool2) && (a(paramd_, -n, 0))) || ((!bool2) && (a(paramd_, n, 0)))) {
                    break label498;
                  }
                  i2 = 1;
                  if (i2 > i1) {
                    break label123;
                  }
                  if (bool1) {
                    break label155;
                  }
                  if ((a(paramd_, -n, -i2)) || ((!bool2) && (a(paramd_, -n, i2))) || ((!bool2) && (a(paramd_, n, -i2)))) {
                    break label498;
                  }
                  if (!bool2)
                  {
                    if (a(paramd_, n, i2)) {
                      break label498;
                    }
                    i2++;
                  }
                  if (!bool1) {
                    break;
                  }
                }
                i1++;
                if (bool2) {
                  break label139;
                }
              }
              if (((!bool2) && (a(paramd_, 0, -i1))) || ((!bool2) && (a(paramd_, 0, i1)))) {
                break label498;
              }
              i2 = 1;
              do
              {
                if (i2 > n) {
                  break;
                }
              } while (bool2);
            } while (bool1);
            if (bool2) {
              break;
            }
          } while (bool1);
          if ((a(paramd_, i2, -i1)) || ((!bool2) && (a(paramd_, i2, i1))) || ((!bool2) && (a(paramd_, -i2, -i1)))) {
            break;
          }
          if (!bool2)
          {
            if (a(paramd_, -i2, i1)) {
              break;
            }
            i2++;
          }
        } while (!bool1);
      }
      label384:
      label387:
      label498:
      paramd_.c(this);
    }
    
    b.c_ a(d_ paramd_, int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean1, c paramc, z paramz1, z paramz2, boolean paramBoolean2)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      this.h = 2147483647;
      this.i = 0;
      this.j = 0;
      int k = this.c + this.a / 2;
      int m = this.d + this.b / 2;
      c(paramInt1 - k, paramInt2 - m);
      k = this.c + this.a / 2;
      m = this.d + this.b / 2;
      b.c_ localc_1 = null;
      int n = 0;
      label481:
      label490:
      do
      {
        if (n >= paramInt4) {
          break;
        }
        if (bool1) {
          break label571;
        }
        if (b.this.q())
        {
          localc_1 = a(paramd_, n, paramc, paramz1, paramBoolean1, paramBoolean2);
          if (bool2) {
            continue;
          }
          if (localc_1 != null)
          {
            double d1 = Math.sqrt((k - localc_1.a) * (k - localc_1.a) + (m - localc_1.b) * (m - localc_1.b));
            if (((bool2) || (paramz2 != null)) && ((bool2) || (!paramz2.isEmpty())))
            {
              int i1 = k - localc_1.a;
              int i2 = m - localc_1.b;
              this.c += i1;
              this.d += i2;
              this.e += i1;
              this.f += i2;
              b.g_ localg_ = new b.g_(b.this, k, m);
              paramz2.a(localg_);
              a.c.y localy = paramz2.h();
              if (localy.e()) {}
              do
              {
                b.c_ localc_2 = (b.c_)localy.j();
                if (bool1) {
                  break label544;
                }
                if (localg_.compare(localc_2, localc_1) < 0)
                {
                  if (!bool2) {
                    if (a.d.w.a(k, m, localc_2.a, localc_2.b) >= Math.max(b.this.i / b.this.e, d1))
                    {
                      if (bool2) {
                        break label490;
                      }
                      if (a.d.w.a(localc_1.a, localc_1.b, localc_2.a, localc_2.b) >= 15.0D / b.this.e) {
                        break label481;
                      }
                    }
                  }
                  if (bool2) {
                    break label490;
                  }
                  if (a(paramd_, localc_2.a - k, localc_2.b - m, paramc, paramBoolean1)) {
                    return localc_2;
                  }
                }
                localy.f();
                if (!bool1) {
                  break;
                }
                this.c -= i1;
                this.d -= i2;
                this.e -= i1;
              } while (bool2);
              this.f -= i2;
            }
            if (n != 0) {
              return localc_1;
            }
            return null;
          }
        }
        n += paramInt3;
      } while (!bool1);
      label544:
      if ((!bool2) && (paramBoolean1))
      {
        label571:
        this.c += this.i;
        this.d += this.j;
        this.e += this.i;
        this.f += this.j;
        return localc_1;
      }
      return null;
    }
    
    boolean a(d_ paramd_, int paramInt1, int paramInt2, int paramInt3, int paramInt4, c paramc, boolean paramBoolean)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      this.h = 2147483647;
      this.i = 0;
      this.j = 0;
      int k = this.c + this.a / 2;
      int m = this.d + this.b / 2;
      c(paramInt1 - k, paramInt2 - m);
      int n = 0;
      do
      {
        if (n >= paramInt4) {
          break;
        }
        if (bool1) {
          break label143;
        }
        if (b.this.q())
        {
          if (bool2) {
            continue;
          }
          if (a(paramd_, 0, 0, n, paramc, paramBoolean))
          {
            if (!bool2) {
              if (n != 0) {
                return true;
              }
            }
            return false;
          }
        }
        n += paramInt3;
      } while (!bool1);
      if ((!bool2) && (paramBoolean))
      {
        label143:
        this.c += this.i;
        this.d += this.j;
        this.e += this.i;
        this.f += this.j;
        return true;
      }
      return false;
    }
    
    boolean a(d_ paramd_, int paramInt1, int paramInt2, int paramInt3)
    {
      return a(paramd_, paramInt1, paramInt2, paramInt3, false);
    }
    
    boolean a(d_ paramd_, int paramInt1, int paramInt2, int paramInt3, boolean paramBoolean)
    {
      return a(paramd_, paramInt1, paramInt2, paramInt3, null, paramBoolean);
    }
    
    b.c_ a(d_ paramd_, int paramInt, c paramc, z paramz, boolean paramBoolean1, boolean paramBoolean2)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      int k = this.c + this.a / 2;
      int m = this.d + this.b / 2;
      if (paramInt == 0)
      {
        localObject1 = paramz.h();
        do
        {
          if (!((a.c.y)localObject1).e()) {
            break;
          }
          localObject2 = (b.i_)((a.c.y)localObject1).j();
          if ((bool2) || (paramBoolean2))
          {
            if (bool2) {
              continue;
            }
            if (!((b.i_)localObject2).c()) {}
          }
          else
          {
            localObject3 = new a.d.w(k, m);
            if (bool2) {
              continue;
            }
            if (((b.i_)localObject2).a((a.d.w)localObject3))
            {
              if (bool2) {
                continue;
              }
              if (a(paramd_, 0, 0, paramc, paramBoolean1)) {
                return new b.c_((a.d.w)localObject3, ((b.i_)localObject2).m(), (b.i_)localObject2);
              }
            }
          }
          ((a.c.y)localObject1).f();
        } while (!bool1);
        return null;
      }
      Object localObject1 = new r(new a.d.w(k, m), paramInt);
      Object localObject2 = new z();
      Object localObject3 = paramz.h();
      label218:
      if (((a.c.y)localObject3).e()) {}
      Object localObject5;
      label314:
      label316:
      while (bool2)
      {
        localObject4 = (b.i_)((a.c.y)localObject3).j();
        if (!bool2) {
          if (paramBoolean2)
          {
            if (bool2) {
              break label401;
            }
            if (!((b.i_)localObject4).c()) {
              break label387;
            }
          }
        }
        if (((b.i_)localObject4).d().a() == ((b.i_)localObject4).e().a())
        {
          if (bool2) {
            break label314;
          }
          localObject5 = ((r)localObject1).b(((b.i_)localObject4).d().a());
          if (!bool1) {
            break label316;
          }
        }
        localObject5 = ((r)localObject1).a(((b.i_)localObject4).d().b());
        if (localObject5 != null)
        {
          int n = 0;
          do
          {
            if (n >= localObject5.length) {
              break label387;
            }
            if (bool1) {
              break;
            }
            if (((b.i_)localObject4).a(localObject5[n]))
            {
              int i1 = ((b.i_)localObject4).m();
              ((z)localObject2).add(new b.c_(localObject5[n], i1, (b.i_)localObject4));
            }
            n++;
          } while (!bool1);
        }
        ((a.c.y)localObject3).f();
        if (bool2) {
          break label218;
        }
        if (!bool1) {
          break;
        }
      }
      label387:
      label401:
      localObject3 = new b.g_(b.this);
      ((z)localObject2).a((Comparator)localObject3);
      Object localObject4 = ((z)localObject2).h();
      do
      {
        if (!((a.c.y)localObject4).e()) {
          break;
        }
        localObject5 = (b.c_)((a.c.y)localObject4).j();
        if (!bool2)
        {
          if (a(paramd_, ((b.c_)localObject5).a - k, ((b.c_)localObject5).b - m, paramc, paramBoolean1)) {
            return localObject5;
          }
          ((a.c.y)localObject4).f();
        }
      } while (!bool1);
      return null;
    }
    
    boolean a(d_ paramd_, int paramInt1, int paramInt2, int paramInt3, c paramc, boolean paramBoolean)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      if (!bool2) {
        if (paramInt3 == 0) {
          return a(paramd_, paramInt1, paramInt2, paramc, paramBoolean);
        }
      }
      int k = paramInt3;
      int m = 0;
      int n = paramInt3 * paramInt3;
      int i1 = n;
      if (k >= m)
      {
        if (bool1) {
          break label342;
        }
        if (a(paramd_, paramInt1 + k, paramInt2 + m, paramc, paramBoolean)) {
          return true;
        }
      }
      label333:
      while (bool2)
      {
        if (!bool2) {
          if (a(paramd_, paramInt1 + k, paramInt2 - m, paramc, paramBoolean)) {
            return true;
          }
        }
        if (!bool2) {
          if (a(paramd_, paramInt1 - k, paramInt2 + m, paramc, paramBoolean)) {
            return true;
          }
        }
        if (!bool2) {
          if (a(paramd_, paramInt1 - k, paramInt2 - m, paramc, paramBoolean)) {
            return true;
          }
        }
        if (!bool2) {
          if (a(paramd_, paramInt1 + m, paramInt2 + k, paramc, paramBoolean)) {
            return true;
          }
        }
        if (!bool2) {
          if (a(paramd_, paramInt1 + m, paramInt2 - k, paramc, paramBoolean)) {
            return true;
          }
        }
        if (!bool2) {
          if (a(paramd_, paramInt1 - m, paramInt2 + k, paramc, paramBoolean)) {
            return true;
          }
        }
        if (!bool2) {
          if (a(paramd_, paramInt1 - m, paramInt2 - k, paramc, paramBoolean)) {
            return true;
          }
        }
        if (!bool2) {
          if (i1 < n)
          {
            i1 += 1 + 2 * m;
            m++;
            if (bool2) {
              break label333;
            }
            if (!bool1) {
              break;
            }
          }
        }
        i1 += 2 - 2 * k + 2 * m;
        k--;
        m++;
        if (!bool1) {
          break;
        }
      }
      label342:
      return false;
    }
    
    private final boolean a(d_ paramd_, int paramInt1, int paramInt2, c paramc, boolean paramBoolean)
    {
      boolean bool = a.wb;
      a.d.w localw = new a.d.w(paramInt1 + this.c + this.a * 0.5D, paramInt2 + this.d + this.b * 0.5D);
      if ((bool) || (paramc != null))
      {
        if (bool) {
          break label77;
        }
        if (!paramc.a(localw)) {
          return false;
        }
      }
      label77:
      if (!bool)
      {
        if (!paramBoolean) {
          return a(paramd_, paramInt1, paramInt2);
        }
        this.c += paramInt1;
        this.d += paramInt2;
      }
      int k = a(paramd_);
      if (!bool) {
        if (k < this.h)
        {
          this.h = k;
          this.i = paramInt1;
          this.j = paramInt2;
        }
      }
      if (!bool)
      {
        if (k == 0)
        {
          this.e += paramInt1;
          this.f += paramInt2;
          return true;
        }
        this.c -= paramInt1;
        this.d -= paramInt2;
      }
      return false;
    }
    
    private final boolean a(d_ paramd_, int paramInt1, int paramInt2)
    {
      this.c += paramInt1;
      this.d += paramInt2;
      if (!a.wb)
      {
        if (!d(paramd_))
        {
          this.e += paramInt1;
          this.f += paramInt2;
          return true;
        }
        this.c -= paramInt1;
        this.d -= paramInt2;
      }
      return false;
    }
    
    private int a(d_ paramd_)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      int k = Math.max(this.c, paramd_.c);
      int m = Math.min(this.c + this.a, paramd_.c + paramd_.a);
      int n = Math.max(this.d, paramd_.d);
      int i1 = Math.min(this.d + this.b, paramd_.d + paramd_.b);
      int i2 = 0;
      int i3 = k;
      label151:
      do
      {
        if (i3 >= m) {
          break;
        }
        if (bool1) {
          break label166;
        }
        int i4 = n;
        do
        {
          do
          {
            if (i4 >= i1) {
              break label151;
            }
            if (bool1) {
              break;
            }
            if (a(i3, i4))
            {
              if (bool2) {
                continue;
              }
              if (paramd_.a(i3, i4)) {
                i2++;
              }
            }
            i4++;
          } while (!bool1);
          i3++;
        } while (bool2);
      } while (!bool1);
      label166:
      return i2;
    }
    
    public boolean a(int paramInt1, int paramInt2)
    {
      boolean bool = a.wb;
      if (!bool) {
        if (paramInt1 >= this.c)
        {
          if (bool) {
            break label68;
          }
          if (paramInt1 < this.c + this.a)
          {
            if (bool) {
              break label68;
            }
            if (paramInt2 >= this.d)
            {
              if (bool) {
                break label86;
              }
              if (paramInt2 < this.d + this.b) {
                break label69;
              }
            }
          }
        }
      }
      label68:
      return false;
      label69:
      label86:
      int k = (paramInt2 - this.d) * this.a + paramInt1 - this.c;
      return this.g.get(k);
    }
    
    public void a(int paramInt1, int paramInt2, boolean paramBoolean)
    {
      boolean bool = a.wb;
      if (((bool) || (paramInt1 >= this.c)) && ((bool) || (paramInt1 < this.c + this.a)) && ((bool) || (paramInt2 >= this.d)))
      {
        if (bool) {
          break label92;
        }
        if (paramInt2 < this.d + this.b) {}
      }
      else
      {
        throw new IndexOutOfBoundsException();
      }
      label92:
      int k = (paramInt2 - this.d) * this.a + paramInt1 - this.c;
      if (!bool)
      {
        if (paramBoolean)
        {
          if (bool) {
            break label130;
          }
          this.g.set(k);
        }
      }
      else if (!a.vb) {
        return;
      }
      label130:
      this.g.clear(k);
    }
    
    public void a(int paramInt1, int paramInt2, int paramInt3, boolean paramBoolean)
    {
      boolean bool = a.wb;
      if (((bool) || (paramInt1 >= this.c)) && ((bool) || (paramInt2 < this.c + this.a)) && ((bool) || (paramInt3 >= this.d)))
      {
        if (bool) {
          break label92;
        }
        if (paramInt3 < this.d + this.b) {}
      }
      else
      {
        throw new IndexOutOfBoundsException();
      }
      label92:
      int k = (paramInt3 - this.d) * this.a + paramInt1 - this.c;
      int m = (paramInt3 - this.d) * this.a + paramInt2 - this.c;
      if (!bool)
      {
        if (paramBoolean)
        {
          if (bool) {
            break label155;
          }
          this.g.set(k, m);
        }
      }
      else if (!a.vb) {
        return;
      }
      label155:
      this.g.clear(k, m);
    }
    
    public void c(int paramInt1, int paramInt2)
    {
      this.c += paramInt1;
      this.d += paramInt2;
      this.e += paramInt1;
      this.f += paramInt2;
    }
    
    public void c(d_ paramd_)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      if (!bool2) {
        if (paramd_.c >= this.c)
        {
          if (bool2) {
            break label137;
          }
          if (paramd_.c < this.c + this.a)
          {
            if (bool2) {
              break label137;
            }
            if (paramd_.d >= this.d)
            {
              if (bool2) {
                break label137;
              }
              if (paramd_.d < this.d + this.b)
              {
                if (bool2) {
                  break label137;
                }
                if (paramd_.c + paramd_.a <= this.c + this.a)
                {
                  if (bool2) {
                    break label212;
                  }
                  if (paramd_.d + paramd_.b <= this.d + this.b) {
                    break label204;
                  }
                }
              }
            }
          }
        }
      }
      label137:
      b(Math.min(paramd_.c, this.c), Math.min(paramd_.d, this.d), Math.max(paramd_.c + paramd_.a, this.c + this.a), Math.max(paramd_.d + paramd_.b, this.d + this.b));
      label204:
      label212:
      int k = paramd_.g.nextSetBit(0);
      do
      {
        if (k < 0) {
          break;
        }
        int m = k % paramd_.a + paramd_.c;
        int n = k / paramd_.a + paramd_.d;
        int i1 = m - this.c + (n - this.d) * this.a;
        this.g.set(i1);
        k = paramd_.g.nextSetBit(k + 1);
      } while (!bool1);
    }
    
    void b(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      int k = paramInt3 - paramInt1;
      g localg = new g(k * (paramInt4 - paramInt2));
      int m = this.g.nextSetBit(0);
      do
      {
        if (m < 0) {
          break;
        }
        int n = m % this.a + this.c;
        int i1 = m / this.a + this.d;
        localg.set(n - paramInt1 + (i1 - paramInt2) * k);
        m = this.g.nextSetBit(m + 1);
        if ((!bool2) && (bool1)) {
          return;
        }
      } while (!bool1);
      this.g = localg;
      this.c = paramInt1;
      this.d = paramInt2;
      this.a = k;
      if (!bool2) {
        this.b = (paramInt4 - paramInt2);
      }
    }
    
    public boolean d(d_ paramd_)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      if (!bool2) {
        if (paramd_.c < this.c + this.a)
        {
          if (bool2) {
            break label95;
          }
          if (paramd_.d < this.d + this.b)
          {
            if (bool2) {
              break label95;
            }
            if (paramd_.c + paramd_.a > this.c)
            {
              if (bool2) {
                break label97;
              }
              if (paramd_.d + paramd_.b > this.d) {
                break label96;
              }
            }
          }
        }
      }
      label95:
      return false;
      label96:
      label97:
      d_ locald_1 = this;
      d_ locald_2 = paramd_;
      int k = Math.max(locald_1.c, locald_2.c);
      int m = Math.min(locald_1.c + locald_1.a, locald_2.c + locald_2.a);
      int n = Math.max(locald_1.d, locald_2.d);
      int i1 = Math.max(locald_1.d + locald_1.b, locald_2.d + locald_2.b);
      if (!bool2) {
        if (k < m)
        {
          if (bool2) {
            break label463;
          }
          if (n < i1)
          {
            int i2 = locald_1.a(k, n, k, n, m, i1);
            int i3 = locald_2.a(k, n, k, n, m, i1);
            label389:
            label397:
            label406:
            label457:
            do
            {
              int i4;
              int i6;
              do
              {
                int i5;
                int i7;
                do
                {
                  do
                  {
                    if (i2 < 0) {
                      break label460;
                    }
                    if (bool1) {
                      break label461;
                    }
                    if (i3 < 0) {
                      break label460;
                    }
                    i4 = i2 % locald_1.a + locald_1.c;
                    i5 = i3 % locald_2.a + locald_2.c;
                    i6 = i2 / locald_1.a + locald_1.d;
                    i7 = i3 / locald_2.a + locald_2.d;
                    if (bool2) {
                      break label406;
                    }
                    if (i6 != i7) {
                      break label397;
                    }
                    if (!bool2)
                    {
                      if (i4 == i5) {
                        return true;
                      }
                      if (bool2) {
                        break label389;
                      }
                    }
                    if (i4 >= i5) {
                      break;
                    }
                    i2 = locald_1.a(i5, i7, k, n, m, i1);
                    if (bool2) {
                      break label389;
                    }
                  } while (!bool1);
                  i3 = locald_2.a(i4, i6, k, n, m, i1);
                } while ((!bool2) && (!bool1));
                if (bool2) {
                  break label457;
                }
                if (i6 >= i7) {
                  break;
                }
                i2 = locald_1.a(i5, i7, k, n, m, i1);
                if (bool2) {
                  break label457;
                }
              } while (!bool1);
              i3 = locald_2.a(i4, i6, k, n, m, i1);
            } while (!bool1);
            label460:
            label461:
            return false;
          }
        }
      }
      label463:
      return false;
    }
    
    final int a(d_ paramd_, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      int k = paramInt1 - paramd_.c + (paramInt2 - paramd_.d) * paramd_.a;
      paramInt3 -= paramd_.c;
      paramInt5 -= paramd_.c;
      paramInt4 -= paramd_.d;
      paramInt6 -= paramd_.d;
      if (((bool2) || (k >= 0)) && ((bool2) || (k % paramd_.a >= paramInt3)) && ((bool2) || (k % paramd_.a < paramInt5))) {
        if (!bool2)
        {
          if (k / paramd_.a < paramInt4) {
            break label148;
          }
          if (bool2) {
            break label145;
          }
        }
      }
      label145:
      label148:
      int m = k / paramd_.a < paramInt6 ? 1 : 0;
      if (m == 0)
      {
        if (!bool2) {
          if (k % paramd_.a < paramInt3)
          {
            k += paramInt3 - k % paramd_.a;
            if (bool2) {
              break label224;
            }
            if (!bool1) {
              break label215;
            }
          }
        }
        k += paramd_.a - k % paramd_.a;
      }
      label215:
      label224:
      k = paramd_.g.nextSetBit(k);
      label302:
      label305:
      do
      {
        if (k < 0) {
          return -1;
        }
        do
        {
          if (((bool2) || (k % paramd_.a >= paramInt3)) && ((bool2) || (k % paramd_.a < paramInt5))) {
            if (!bool2)
            {
              if (k / paramd_.a < paramInt4) {
                break label305;
              }
              if (bool2) {
                break label302;
              }
            }
          }
          m = k / paramd_.a < paramInt6 ? 1 : 0;
          if (m == 0) {
            break;
          }
        } while (bool2);
      } while (bool1);
      return k;
    }
    
    public final int a(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      int k = paramInt1 - this.c + (paramInt2 - this.d) * this.a;
      paramInt3 -= this.c;
      paramInt5 -= this.c;
      paramInt4 -= this.d;
      paramInt6 -= this.d;
      if (((bool2) || (k >= 0)) && ((bool2) || (k % this.a >= paramInt3)) && ((bool2) || (k % this.a < paramInt5))) {
        if (!bool2)
        {
          if (k / this.a < paramInt4) {
            break label145;
          }
          if (bool2) {
            break label142;
          }
        }
      }
      label142:
      label145:
      int m = k / this.a < paramInt6 ? 1 : 0;
      if (m == 0)
      {
        if (!bool2) {
          if (k % this.a < paramInt3)
          {
            k += paramInt3 - k % this.a;
            if (bool2) {
              break label219;
            }
            if (!bool1) {
              break label210;
            }
          }
        }
        k += this.a - k % this.a;
      }
      label210:
      label219:
      k = this.g.nextSetBit(k);
      label296:
      label299:
      do
      {
        if (k < 0) {
          return -1;
        }
        do
        {
          if (((bool2) || (k % this.a >= paramInt3)) && ((bool2) || (k % this.a < paramInt5))) {
            if (!bool2)
            {
              if (k / this.a < paramInt4) {
                break label299;
              }
              if (bool2) {
                break label296;
              }
            }
          }
          m = k / this.a < paramInt6 ? 1 : 0;
          if (m == 0) {
            break;
          }
        } while (bool2);
      } while (bool1);
      return k;
    }
    
    public String toString()
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      StringBuffer localStringBuffer = new StringBuffer(this.a * this.b + this.b + 1);
      int k = 0;
      int m = 0;
      label109:
      do
      {
        if (m >= this.b) {
          break;
        }
        int n = 0;
        do
        {
          do
          {
            if (n >= this.a) {
              break label109;
            }
            if (bool1) {
              break;
            }
            if (this.g.get(k))
            {
              localStringBuffer.append('#');
              if (bool2) {
                continue;
              }
              if (!bool1) {}
            }
            else
            {
              localStringBuffer.append('.');
            }
            k++;
            n++;
          } while (!bool1);
          localStringBuffer.append('\n');
          m++;
        } while (bool2);
      } while (!bool1);
      return "x: " + this.c + " y: " + this.d + "\n" + localStringBuffer.toString();
    }
  }
  
  class f_
    implements p
  {
    static final byte a = 0;
    static final byte b = 1;
    static final byte c = 2;
    static final byte d = 3;
    Object e;
    Object f;
    byte g;
    
    f_(Object paramObject1, Object paramObject2, byte paramByte)
    {
      this.e = paramObject1;
      this.f = paramObject2;
      this.g = paramByte;
    }
    
    public boolean b()
    {
      boolean bool = a.wb;
      if (!bool) {
        if (this.g != 2) {
          if (bool) {
            break label29;
          }
        }
      }
      label29:
      return this.g == 3;
    }
    
    public void a(double paramDouble1, double paramDouble2)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      Object localObject;
      if (!bool2) {
        if (this.g == 1)
        {
          localObject = b.this.d.l((d)this.e);
          z localz = new z();
          a.d.x localx = ((a.d.y)localObject).b();
          do
          {
            if (!localx.e()) {
              break;
            }
            a.d.w localw = localx.a();
            localz.add(new a.d.w(localw.a + paramDouble1, localw.b + paramDouble2));
            localx.f();
            if (bool2) {
              break label152;
            }
            if (bool1) {
              break label150;
            }
          } while (!bool1);
          if (bool2) {
            break label183;
          }
          b.this.d.b((d)this.e, localz);
        }
      }
      label150:
      label152:
      if ((bool2) || ((bool1) && ((bool2) || (this.g == 0))))
      {
        label183:
        localObject = b.this.d.r((e)this.e);
        b.this.d.b((e)this.e, new a.d.w(((a.d.w)localObject).a + paramDouble1, ((a.d.w)localObject).b + paramDouble2));
      }
    }
    
    public t a()
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      if (!bool2) {
        if (this.g == 1)
        {
          double d1 = 1.7976931348623157E+308D;
          double d2 = 1.7976931348623157E+308D;
          double d3 = -1.797693134862316E+308D;
          double d4 = -1.797693134862316E+308D;
          a.d.y localy = b.this.d.n((d)this.e);
          a.d.x localx = localy.b();
          do
          {
            if (!localx.e()) {
              break;
            }
            a.d.w localw = localx.a();
            d1 = Math.min(d1, localw.a);
            d2 = Math.min(d2, localw.b);
            d3 = Math.max(d3, localw.a);
            d4 = Math.max(d4, localw.b);
            localx.f();
          } while (!bool1);
          return new t(d1, d2, d3 - d1, d4 - d2);
        }
      }
      Object localObject2;
      a.d.o localo;
      if (!bool2)
      {
        if (this.g == 3)
        {
          localObject1 = (d)this.f;
          localObject2 = (wb)this.e;
          localo = ((wb)localObject2).a().a(((wb)localObject2).d().f(), b.this.d.e(localObject1), b.this.d.d(((d)localObject1).e()), b.this.d.d(((d)localObject1).f()), ((wb)localObject2).e());
          return localo.a();
        }
        if (bool2) {}
      }
      else if (this.g == 2)
      {
        localObject1 = (e)this.f;
        localObject2 = (xc)this.e;
        localo = ((xc)localObject2).a().a(((xc)localObject2).d().f(), b.this.d.d(localObject1), ((xc)localObject2).e());
        return localo.a();
      }
      Object localObject1 = b.this.d.d(this.e);
      return new t(((zc)localObject1).a(), ((zc)localObject1).b(), ((zc)localObject1).c(), ((zc)localObject1).d());
    }
    
    public boolean a(t paramt)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      if (!bool2) {
        if (this.g == 1)
        {
          a.d.y localy = b.this.d.n((d)this.e);
          v localv = localy.l();
          do
          {
            if (!localv.e()) {
              break;
            }
            a.d.n localn = localv.a();
            if (bool1) {
              break label91;
            }
            if (localn.a(paramt)) {
              return true;
            }
            localv.f();
          } while (!bool1);
          label91:
          return false;
        }
      }
      return t.a(paramt, a());
    }
  }
  
  class h_
  {
    private bb a;
    private z c;
    private boolean d;
    private Object e;
    
    h_(Object paramObject, bb parambb, boolean paramBoolean, k paramk)
    {
      this.e = paramObject;
      this.a = parambb;
      this.d = paramBoolean;
      a.c.x localx = db.a();
      a.c.w localw = parambb.l();
      do
      {
        if (!localw.e()) {
          break;
        }
        e locale = localw.d();
        localx.a(locale, true);
        localw.f();
        if ((!bool2) && (bool1)) {
          return;
        }
      } while (!bool1);
      if (!bool2) {
        a(localx, paramk);
      }
    }
    
    private void a(k paramk1, k paramk2)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      this.c = new z();
      ab localab = new ab();
      a.c.n localn = db.b();
      Object localObject1 = this.a.l();
      Object localObject2;
      Object localObject3;
      Object localObject4;
      label139:
      do
      {
        do
        {
          if (!((a.c.w)localObject1).e()) {
            break;
          }
          localObject2 = ((a.c.w)localObject1).d();
          if (bool1) {
            break label188;
          }
          localObject3 = ((e)localObject2).l();
          do
          {
            if (!((a.c.m)localObject3).e()) {
              break label139;
            }
            localObject4 = ((a.c.m)localObject3).a();
            if (bool1) {
              break;
            }
            if (!localn.getBool(localObject4))
            {
              localab.add(localObject4);
              localn.a(localObject4, true);
            }
            ((a.c.m)localObject3).f();
          } while (!bool1);
          localObject3 = new b.f_(b.this, localObject2, localObject2, (byte)0);
          this.c.add(localObject3);
          ((a.c.w)localObject1).f();
        } while (bool2);
      } while (!bool1);
      label188:
      localObject1 = localab.l();
      label385:
      label387:
      do
      {
        do
        {
          if (!((a.c.m)localObject1).e()) {
            return;
          }
          localObject2 = ((a.c.m)localObject1).a();
          if (((bool2) || ((paramk2 == null) || ((bool2) || (paramk2.getBool(localObject2))))) && ((bool2) || ((paramk1.getBool(((d)localObject2).e())) && (paramk1.getBool(((d)localObject2).f())))))
          {
            localObject3 = new b.f_(b.this, localObject2, localObject2, (byte)1);
            this.c.add(localObject3);
            localObject4 = b.this.d.g(localObject2);
            int i = 0;
            do
            {
              if (i >= localObject4.length) {
                break;
              }
              Object localObject5 = localObject4[i];
              b.f_ localf_ = new b.f_(b.this, localObject5, localObject2, (byte)3);
              this.c.add(localf_);
              i++;
              if (bool2) {
                break label387;
              }
              if (bool1) {
                break label385;
              }
            } while (!bool1);
          }
        } while (bool2);
        ((a.c.m)localObject1).f();
      } while (!bool1);
    }
    
    public void a(double paramDouble1, double paramDouble2)
    {
      boolean bool2 = a.wb;
      boolean bool1 = a.vb;
      if ((bool2) || ((paramDouble1 == 0.0D) && (paramDouble2 == 0.0D))) {
        return;
      }
      a.c.y localy = this.c.h();
      do
      {
        if (!localy.e()) {
          break;
        }
        b.f_ localf_ = (b.f_)localy.j();
        localf_.a(paramDouble1, paramDouble2);
        localy.f();
      } while (!bool1);
    }
    
    public t a()
    {
      boolean bool = a.vb;
      double d1 = 1.7976931348623157E+308D;
      double d2 = 1.7976931348623157E+308D;
      double d3 = -1.797693134862316E+308D;
      double d4 = -1.797693134862316E+308D;
      a.c.y localy = this.c.h();
      do
      {
        if (!localy.e()) {
          break;
        }
        b.f_ localf_ = (b.f_)localy.j();
        if (bool) {
          break label151;
        }
        t localt = localf_.a();
        d1 = Math.min(d1, localt.d);
        d2 = Math.min(d2, localt.e);
        d3 = Math.max(d3, localt.d + localt.a);
        d4 = Math.max(d4, localt.e + localt.b);
        localy.f();
      } while (!bool);
      label151:
      return new t(d1, d2, d3 - d1, d4 - d2);
    }
    
    public Object b()
    {
      return this.e;
    }
    
    public boolean c()
    {
      return this.d;
    }
    
    public bb d()
    {
      return this.a;
    }
    
    public z e()
    {
      return this.c;
    }
  }
  
  private static class e_
    implements Comparator
  {
    private e_() {}
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool = a.wb;
      b.i_ locali_1 = (b.i_)paramObject1;
      b.i_ locali_2 = (b.i_)paramObject2;
      if (!bool) {
        if (locali_1.c())
        {
          if (bool) {
            break label47;
          }
          if (!locali_2.c()) {
            return -1;
          }
        }
      }
      label47:
      if (!bool) {
        if (!locali_1.c())
        {
          if (bool) {
            break label74;
          }
          if (locali_2.c()) {
            return 1;
          }
        }
      }
      label74:
      int i = locali_1.m();
      int j = locali_2.m();
      if (!bool)
      {
        if (i < j) {
          return -1;
        }
        if (bool) {}
      }
      else if (i > j)
      {
        return 1;
      }
      return 0;
    }
    
    e_(b.0 param0)
    {
      this();
    }
  }
  
  static class i_
    extends a.d.n
  {
    static final Comparator k = new b.e_(null);
    private final int l;
    private final a.d.n m;
    
    i_(a.d.w paramw1, a.d.w paramw2, int paramInt)
    {
      super(paramw2);
      this.m = null;
      this.l = paramInt;
    }
    
    i_(a.d.w paramw1, a.d.w paramw2, int paramInt, a.d.n paramn)
    {
      super(paramw2);
      this.l = paramInt;
      this.m = paramn;
    }
    
    public boolean c()
    {
      if (!a.wb) {}
      return d().b == e().b;
    }
    
    public int m()
    {
      return this.l;
    }
    
    public a.d.n n()
    {
      return this.m;
    }
    
    public String toString()
    {
      return d() + " " + e() + " priority: " + this.l;
    }
    
    public boolean equals(Object paramObject)
    {
      boolean bool = a.wb;
      if (!bool) {
        if (this == paramObject) {
          return true;
        }
      }
      if (paramObject != null)
      {
        if (bool) {
          break label37;
        }
        if (getClass() == paramObject.getClass()) {}
      }
      else
      {
        return false;
      }
      label37:
      i_ locali_ = (i_)paramObject;
      if (!bool) {
        if (this.l != locali_.l) {
          return false;
        }
      }
      if (!bool) {
        if (d().equals(locali_.d()))
        {
          if (bool) {
            break label97;
          }
          if (e().equals(locali_.e())) {
            break label96;
          }
        }
      }
      return false;
      label96:
      label97:
      return true;
    }
    
    public int hashCode()
    {
      int i = this.l;
      i = 31 * i + d().hashCode();
      i = 31 * i + e().hashCode();
      return i;
    }
  }
  
  static class b_
    implements m.g_
  {
    private z a = new z();
    
    public void a(Object paramObject1, Object paramObject2)
    {
      b.i_ locali_1 = (b.i_)paramObject1;
      b.i_ locali_2 = (b.i_)paramObject2;
      int i = locali_1.m() + locali_2.m();
      a.d.w localw = a.d.n.a(locali_1, locali_2);
      if (localw != null) {
        this.a.add(new b.c_(localw, i, locali_1, locali_2));
      }
    }
    
    public z a()
    {
      return this.a;
    }
  }
  
  class g_
    implements Comparator, l.j_
  {
    private a.d.w a;
    
    g_()
    {
      this.a = null;
    }
    
    g_(double paramDouble1, double paramDouble2)
    {
      this.a = new a.d.w(paramDouble1, paramDouble2);
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool = a.wb;
      double d1 = 50.0D / b.this.e;
      b.c_ localc_1 = (b.c_)paramObject1;
      b.c_ localc_2 = (b.c_)paramObject2;
      double d2 = (bool) || (this.a != null) ? a.d.w.a(this.a.a, this.a.b, localc_1.a, localc_1.b) : 0.0D;
      double d3 = (bool) || (this.a != null) ? a.d.w.a(this.a.a, this.a.b, localc_2.a, localc_2.b) : 0.0D;
      int i = (int)Math.floor(d2 / d1);
      int j = (int)Math.floor(d3 / d1);
      if (!bool) {
        if (i < j) {
          return -1;
        }
      }
      if (!bool) {
        if (i > j) {
          return 1;
        }
      }
      int k = l.a(((b.c_)paramObject2).d.size(), ((b.c_)paramObject1).d.size());
      if (!bool) {
        if (k != 0) {
          return k;
        }
      }
      return l.a(((b.c_)paramObject1).c, ((b.c_)paramObject2).c);
    }
  }
  
  static class c_
  {
    final int a;
    final int b;
    final int c;
    final z d;
    
    private c_(a.d.w paramw, int paramInt)
    {
      this.a = ((int)paramw.a);
      this.b = ((int)paramw.b);
      this.c = paramInt;
      this.d = new z();
    }
    
    c_(a.d.w paramw, int paramInt, b.i_ parami_)
    {
      this(paramw, paramInt);
      this.d.add(parami_);
    }
    
    c_(a.d.w paramw, int paramInt, b.i_ parami_1, b.i_ parami_2)
    {
      this(paramw, paramInt);
      this.d.add(parami_1);
      this.d.add(parami_2);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.i.b

 * JD-Core Version:    0.7.0.1

 */